package com.zboot.zbootadmin.project.gen.service.impl;

import com.github.pagehelper.PageHelper;
import com.zboot.zbootadmin.project.gen.mapper.TableMapper;
import com.zboot.zbootadmin.project.gen.service.TableService;
import com.zboot.zbootadmin.project.gen.vo.TablesVo;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;
import java.util.Map;

/**
 * @Author: zyt
 * @Description:
 * @Date: Created in 21:59 2020/6/25
 */
@Service
public class TableServiceImpl implements TableService {

    @Autowired
    private TableMapper tableMapper;

    @Override
    public List<Map<String, Object>> showAllTables(TablesVo tablesVo) {
        PageHelper.startPage(tablesVo.getPageNum(),tablesVo.getPageSize());
        return tableMapper.showAllTables(tablesVo);
    }

    @Override
    public Integer getTotal() {
        return tableMapper.getTotal();
    }
}
